function map(arr, callback) {
    console.log('map', arr, callback)
    let result = []

    // 遍历数组
    for (let i = 0; i < arr.length; i++) {
        result.push(callback(arr[i], i))
    }
    return result
}